package com.dong.es.entity.searchparam.query;

import co.elastic.clients.elasticsearch._types.query_dsl.BoolQuery;
import com.dong.es.entity.EsBaseDTO;
import com.dong.es.entity.searchparam.EsSearchParam;

import java.util.ArrayList;

/**
 * @description: Es 查询相关参数
 * @author: 陈瑞东
 * @create: 2022-06-23 11:23
 */
public abstract class EsQueryParam extends EsSearchParam<BoolQuery.Builder> {
    private static final long serialVersionUID = -8906282170685663994L;

    @Override
    protected void addMethod(EsBaseDTO esBaseDTO) {
        esBaseDTO.query(this);
    }

    @Override
    protected void setMethod(EsBaseDTO esBaseDTO) {
        esBaseDTO.setQuery(new ArrayList<>());
        esBaseDTO.query(this);
    }
}
